import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:moose_app/ui/values/values.dart';
import 'package:moose_app/ui/widgets/icons/search_icon.dart';

class ATHSearchInputView extends StatelessWidget {
  final Function press;

  const ATHSearchInputView({Key key, this.press}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: press,
      child: Container(
        padding: EdgeInsets.symmetric(vertical: kSize14),
        decoration: BoxDecoration(
          color: Colors.white,
          borderRadius: BorderRadius.all(Radius.circular(kSize8)),
          shape: BoxShape.rectangle,
        ),
        child: Row(
          children: [
            Container(
              margin: EdgeInsets.only(left: kSize16),
              child: ATHSearchIcon(),
            ),
            Expanded(
                child: Container(
              margin: EdgeInsets.only(left: kSize32),
              child: Text(
                "搜索",
                style: TextStyle(
                    color: kColor99,
                    fontSize: kFontSize32,
                    fontWeight: FontWeight.normal),
              ),
            ))
          ],
        ),
      ),
    );
  }
}
